Skip to main content
Version: 4.x.x

RequestSendOptionsType


import { RequestSendOptionsType } from "@hyper-fetch/core"

Description

Defined in request/request.types.ts:253

Preview

type RequestSendOptionsType<Request> = FetchQueryParamsType<ExtractRequestQueryParamsType<Request>, ExtractHasQueryParamsType<Request>> & FetchParamsType<ExtractEndpointType<Request>, ExtractHasParamsType<Request>> & FetchPayloadType<ExtractPayloadType<Request>, ExtractHasDataType<Request>> & Omit<FetchOptionsType<ExtractAdapterType<Request>>, params | data> & FetchSendActionsType<Request> & RequestQueueOptions;

Structure

{
...params1: HasQuery extends true ? {
queryParams: NegativeTypes;
} : {
queryParams: QueryParams;
};
...params2: ExtractRouteParams<Endpoint> extends NegativeTypes ? {
params: NegativeTypes;
} : (HasParams extends true ? {
params: NegativeTypes;
} : {
params: NonNullable<ExtractRouteParams<Endpoint>>;
});
...params3: Payload extends NegativeTypes ? {
data: NegativeTypes;
} : (HasData extends true ? {
data: NegativeTypes;
} : {
data: NonNullable<Payload>;
});
...params4: Partial<RequestOptionsType<string, AdapterOptions>>;
onDownloadProgress: (values: ProgressType, details: RequestEventType<Request>) => void;
onRemove: (details: RequestEventType<Request>) => void;
onRequestStart: (details: RequestEventType<Request>) => void;
onResponse: (response: ResponseReturnType<ExtractResponseType<Request>, ExtractErrorType<Request>, ExtractAdapterType<Request>>, details: ResponseDetailsType) => void;
onResponseStart: (details: RequestEventType<Request>) => void;
onSettle: (requestId: string, request: Request) => void;
onUploadProgress: (values: ProgressType, details: RequestEventType<Request>) => void;
dispatcherType: auto | fetch | submit;
}